package com.vueperson.vueperson.t1.CreationalPattern.SimpleFactoryPattern.t01;

public class Factory  {
    //静态工厂方法
    public static Product getProduct(String arg){
        Product product=null;
        if (arg.equalsIgnoreCase("a")){
            product=new ConcreteProductA();
            //初始化设置product
        }else if (arg.equalsIgnoreCase("b")){
            product=new ConcreteProductB();
            //初始化设置product
        }
        return product;
    }
}
